package com.example.mapper;

import com.example.entity.Person;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface PersonMapper {

    /*新增 */
    int insert(Person person);

    /* 删除*/
    @Delete("delete from person where id = #{id}")
    int deleteById(Integer id);

    /*修改*/
    int updateById(Person person);

    /* 根据ID查询*/
    @Select("select * from person where id = #{id}")
    Person selectById(Integer id);

    /* 查询所有*/
    List<Person> selectList(Person person);

}